<?php 
namespace WeiChatLib;
/**
* 
*/
class WeiChat
{
	function __construct(){
		require_once("./Realize/Initialize.php");
		new Initialize();
	}
	public function startReceive(){
		$messge=ToolFactory::createServiceDataReceiveTool()->getGlobeContentToObj();
		if($messge==false){
			echo "success";exit;
		}
		//创建接收的handle
		$MegHandleStart=new MegHandleStart();
		$MegHandleStart->CreateReceiveHandleStart($messge);
	}
	public function userTest(){
		$usermanage=ToolFactory::createUserManage();
		// $code= $usermanage->getUserCode("http://4b7thcqbe9.proxy.qqbrowser.cc");
		// echo $code;
		// $access_token=$usermanage->getUserAccessToken($code);
		// var_dump($access_token);
		// $userinfo=$usermanage->getUserInfo($access_token['access_token'],$access_token['openid']);
		// var_dump($userinfo);
		$result= $usermanage->getUserInfoByListOpenid_Only(array(
				"oZWc3tzh5Fcw2KmzcMuJ8CVHoIBY",
				"oZWc3t7WEh2lSYBuQAUvHaCdFj2A",
				"oZWc3t1i3jtAtKpE6zjxSlwc6QsU",
			));
		var_dump($result);
	}
}